<template>
  <div class="appliances">
    <div class="appliances_banner">
      <img src="https://image.10street.cn/image/4b/0a/4b0a199b73560a7c30bb9da483f01225.png" alt>
    </div>
    <appliances_nav></appliances_nav>
    <appliances_limited :limited_data='limited_data' v-on:commonId='todetail'></appliances_limited>
    <appliances_recommend :recommend_data='recommend_data' v-on:commonId='todetail'></appliances_recommend>
    <appliances_phoneCall :phoneCall_data='phoneCall_data' v-on:commonId='todetail'></appliances_phoneCall>
    <appliances_appliances :appliances_data='appliances_data' v-on:commonId='todetail'></appliances_appliances>
    <appliances_computer :computer_data='computer_data' v-on:commonId='todetail'></appliances_computer>
    <appliances_media :media_data='media_data' v-on:commonId='todetail'></appliances_media>
  </div>
</template>
<script>


import axios from 'axios'

import Appliances_nav from '@/appliances/nav'
import Appliances_limited from '@/appliances/limited'
import Appliances_recommend from '@/appliances/recommend'
import Appliances_phoneCall from '@/appliances/phoneCall'
import Appliances_appliances from '@/appliances/appliances'
import Appliances_computer from '@/appliances/computer'
import Appliances_media from '@/appliances/media'


export default {
  methods: {
    todetail(commonId){
      this.$emit('commonId',commonId)
    }
  },
  components:{
    appliances_nav:Appliances_nav,
    appliances_limited:Appliances_limited,
    appliances_recommend:Appliances_recommend,
    appliances_phoneCall:Appliances_phoneCall,
    appliances_appliances:Appliances_appliances,
    appliances_computer:Appliances_computer,
    appliances_media:Appliances_media,
  },
  data(){
    return{
      limited_data:{},
      recommend_data:{},
      phoneCall_data:{},
      appliances_data:{},
      computer_data:{},
      media_data:{}
    }
  },
  mounted() {
    axios({
      url:'/app/index/index_appliances',
    })
    .then((datalist)=>{
      // console.log()
      this.limited_data = datalist.data.itemList[0],
      this.recommend_data = datalist.data.itemList[1],
      this.phoneCall_data = datalist.data.itemList[2],
      this.appliances_data = datalist.data.itemList[3],
      this.computer_data = datalist.data.itemList[4],
      this.media_data = datalist.data.itemList[5]
    })
  },
};
</script>
<style lang='stylus' scoped>
.appliances
  background rgb(239, 239, 240)
  .appliances_banner 
    img
      width: 100%


</style>